/**
 * @Author Yenchingcheng
 * @Date 2023/5/28 23:28
 * @Description
 **/
public class MethodFactory implements Factory{
    @Override
    public Fruit getFruit(String fruitType) {
        return null;
    }

    @Override
    public Method getMethod(String methodType) {
        if(methodType == null){
            return null;
        }
        if(methodType.equalsIgnoreCase("SALAD")){
            return new Salad();
        }else if(methodType.equalsIgnoreCase("JUICE")){
            return new Juice();
        }
        return null;
    }
}
